<%@ Import Namespace="MVCWeb.Helpers" %>

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IPagedList<MVCWeb.Models.Community>>" %>
<%@ Register Src="~/Views/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="mmuc" %>

<%@ Register Src="~/Views/Shared/LogOnUserControl.ascx" TagName="LogOnUserControl" TagPrefix="louc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Admin: List of communities</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <louc:LogOnUserControl ID="LogOnUserControl1" runat="server" />
     <!-- BEGIN: MainMenu -->    
    <mmuc:MainMenu ID="MainMenu1" runat="server" />
    <!-- END: MainMenu -->
    <h3 style="margin: .15in">
        Admin: List of communities</h3>
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
        <tr>
            <th style="width:1%">
            </th>
            <th style="width:1%">
                Id
            </th>
            <th>
                Community Name
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%= Html.ActionLink("View", "AdminCategory", new {  id=item.CommunityId }) %>
            </td>
            <td style="text-align:center">
                <%= Html.Encode(item.CommunityId) %>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
        </tr>
        <% } %>
    </table>
    <br />
    <div class="pager">
        <%= Html.Pager(ViewData.Model.PageSize, ViewData.Model.PageNumber, ViewData.Model.TotalItemCount) %>
    </div>
</asp:Content>
